package com.starleague.battletech.hexagonal;

import java.util.Map;

import com.starleague.battletech.hexagonal.BattletechHexTerrainType;
import com.starleague.battletech.hexagonal.IBattletechHexTerrain;
import com.starleague.common.AbstractHasInfoProperties;

public abstract class AbstractBattletechHexTerrain
        extends AbstractHasInfoProperties
        implements IBattletechHexTerrain
{
    private AbstractBattletechHex hex;
    private BattletechHexTerrainType hexTerrainType;
    private int level;

    protected AbstractBattletechHexTerrain(AbstractBattletechHex hex,
                                           BattletechHexTerrainType hexTerrainType,
                                           int level)
    {
        this.hex = hex;
        this.hexTerrainType = hexTerrainType;
        this.level = level;
    }

    protected AbstractBattletechHexTerrain()
    {
        //
    }

    @Override
    public AbstractBattletechHex getHex()
    {
        return this.hex;
    }

    @Override
    public BattletechHexTerrainType getHexTerrainType()
    {
        return this.hexTerrainType;
    }

    @Override
    public int getLevel()
    {
        return this.level;
    }

    @Override
    public Map<String, Object> infoProperties()
    {
        Map<String, Object> infoPropertyMap = super.infoProperties();
        infoPropertyMap.put("terrainType", this.hexTerrainType);
        infoPropertyMap.put("level", this.level);
        return infoPropertyMap;
    }
}
